#coding:utf-8
import urllib.parse
import urllib.request
#get请求方式，像普通访问网站一样，参数写在地址栏
dic = {'page':'3'}
data = urllib.parse.urlencode(dic)
req = urllib.request.urlopen('http://localhost:8087/showGoods.do?%s' %data)
#req = urllib.request.urlopen('https://fanyi.baidu.com/?aldtype=16047#zh/en/%E4%BD%A0%E5%A5%BD')
content = req.read().decode() #req.read()  decode()转UTF-8
print(content)